 // 差集
  function difference(a, b) {
    const difference = a.concat(b).filter(v => {
      return !a.includes(v)
    })
    return difference
  }

 console.log(difference([1, 2, 3], [3, 4, 5]))
  //交集
  function intersection(a,b){
    a=[...new Set(a)];
    b=[...new Set(b)]
    const diff=a.filter(item=>{
      return b.includes(item)
    })
    return diff
  }
  //数组去重
  function duplicate(arr){
    return [...new Set(arr)]
  }

  console.log(intersection([1, 2, 3], [3, 4, 5]))
  console.log(duplicate([11,2,2,2,3,3,4,1,111]))
